import request from "@/utils/http";

// 登录
export const loginAPI = (data) => {
  return request({
    url: "/login/account",
    method: "post",
    data,
  });
};
export const loginPhoneAPI = (data) => {
  return request({
    url: "/login/phone",
    method: "post",
    data,
  });
};
// 发送验证码
export const sendCodeAPI = (phone) => {
  return request({
    url: "/users/sendCode",
    method: "post",
    data:{phone}
  });
};
// 获取用户信息
export const getUserDateAPI = () => {
  return request({
    url: "/users",
  });
};

// /users/taskReport 任务量
export const getTaskReportAPI = (params) => {
  return request({
    url: `/users/taskReport`,
    data:params
  });
};

// /users/truck 车辆信息
export const getTruckAPI = () => {
  return request({
    url: "/users/truck",
  });
};